1. Field of the Invention
The present invention relates to a DC motor controller and more particularly to a circuit and method for controlling the moving element of a DC motor.
2. Prior Art
Generally, there are two types of DC motors: a rotary type DC motor in which a moving element thereof, such as a motor shaft, rotates; and a linear type DC motor in which a moving element thereof oscillates.
A conventional circuit for controlling the position of the moving elements of DC motors is shown in FIG. 2. The "control" of a DC motor includes not only a position control of the moving element such as a motor shaft thereof, but also other types of control such as speed control, etc.; however, only the position control will be described below.
Position control of a DC motor 1 is accomplished by a circuit that includes a position sensor 2 which reads the position of the rotating or oscillating element of the DC motor 1, a main control circuit 10 which includes a driving circuit for the DC motor 1, and a computer 3 which controls the main control circuit 10. The main control circuit 10 includes an UP/DOWN counter 11, an adder 12, an amplifier 13, a driver 14 and an encoder 15.
Pulse sequence commands from the computer 3 constitute single position commands by being inputted into one of the terminals of the UP/DOWN counter 11. In other words, when a pulse sequence is input into one terminal, the counter 11 counts UP; and when a pulse sequence is inputted into the other terminal, then the counter 11 counts DOWN. Here, the density of the pulse sequence represents the speed. When such a pulse sequence is inputted into the UP/DOWN counter 11, the number of pulses is counted; as a result, the content of position signal 16 is added by the adder 12 and converted into positional information. Afterward, this positional information is converted by the amplifier 13 into a signal waveform which is suitable for driving the DC motor 1, and a fixed gain is applied, thus producing a current command which is used to drive the DC motor 1 via the driver 14.
The movement (rotation or oscillation) of the moving element of the DC motor 1 (only a rotational movement of moving elements will be descried below) driven by the current command is detected by the position sensor 2, and the output of the position sensor 2 is converted by the encoder 15 into pulse signals 17 and 18 which are indicative of pulses and positions between pulses. The pulse signal 17 is fed back to the UP input of the UP/DOWN counter 11, and the pulse signal 18 is fed back to the DOWN input of the UP/DOWN counter 11. In other words, the UP/DOWN counter 11 initiates an output from the time that a position command is inputted, and it continues to output a deviation until the DC motor 1 rotates so that a number of pulses which is the same as the number of pulses of the position command returns from the encoder 15. When the same number of pulses has returned, the deviation becomes zero, which is an indication that the operation is completed.
When the position sensor 2 has a sine wave output, two sine waves which are shifted 90 degrees in phase are outputted as shown in FIGS. 3(a) and 3(b) and FIGS. 4(a) and 4(b). The position and direction of the moving element, a motor shaft, of the DC motor 1 are ascertained from these waveforms. The encoder 15 generates a forward-rotation pulse signal 17 as shown in FIGS. 3(c) and 3(d) or a reverse-rotation pulse signal 18 as shown in FIGS. 4(c) and 4(d), from the waveforms. Furthermore, the pulse waveforms are ordinarily generated by quadrupling the encoder waveform (thus creating a waveform with 1/4 the period of the original waveform).
In order to stop the DC motor 1 at a fixed position between pulses, the sawtooth-form position signal 16 as shown in FIG. 3(e) or FIG. 4(e) is further generated from the encoder 15 and is fed back to the adder 12. The position signal 16 is produced by converting the interval (amount of movement) from one pulse to the next pulse into an electrical quantity and is generated using the sine wave outputs (the output of the position sensor 2) shown in FIGS. 3(a) and 3(b) and FIGS. 4(a) and 4(b).
Ordinarily, the DC motor 1 is stopped at the center point between pulses; accordingly, as shown in FIG. 3(e) and FIG. 4(e), when the position signal 16 is expressed as a voltage, the interval from the rise of one pulse to the rise of the next pulse is expressed as "V", and the center point is expressed as 0 V. For instance, when the motor is actuated from a stopped state with the position signal 16 assumed to be 0 V, and the position in which the motor is stopped following this actuation is not a position that corresponds to 0 V, then a voltage corresponding to the deviation is fed back to the adder 12, and the output of the adder 12 is corrected so that the position signal 16 returns to the position of 0 V, thus stopping the motor in a fixed position.
The position signal 16 shown in FIG. 3(e) corresponds to the state obtained when the DC motor 1 is actuated in one direction, while the position signal 16 shown in FIG. 4(e) corresponds to the state obtained when the DC motor 1 is actuated in another direction.
In the DC motor position control circuit (that is, in the circuit for controlling the position of the rotating or oscillating element of a DC motor), when there is no command from the computer 3, there is naturally no change in the output of the UP/DOWN counter 11; accordingly, the DC motor 1 should stop at the center point between pulses. In actuality, however, the electronic parts such as the amplifier 13, etc. in the main control circuit 10 have offset characteristics in which the output of such parts is not always zero when there is an input of zero. Because of these offset characteristics, when the DC motor is driven, a position of the moving element which is different from the original position becomes the stopping position. When the fluctuation in output caused by these offset characteristics is small, the result is merely a state in which the stopping position of the motor between pulses is not centered between the pulses. However, in cases where the fluctuation in output is large, then a positional deviation that exceeds one pulse may be generated.
Accordingly, in order to cancel the offset characteristics generated in the main control circuit 10, an offset adjustment circuit 4 is used. The offset adjustment circuit 4 generates an electrical quantity corresponding to the amount of deviation and then adds this quantity, thus aligning the stopping position with the center point between pulses. The main control circuit 10 is adjusted, as an initial adjustment at the time of manufacturing, so that the amount of positional deviation is within one pulse. After the DC motor 1 and main control circuit 10 have been installed in apparatuses, an adjustment to within one pulse (i. e., an adjustment which causes the motor to stop at the center point between pulses) is performed.
The output of the position signal 16 in the stopped state in which this position control is performed is measured, and the offset adjustment circuit 4 is adjusted so that this output becomes 0 V. As a result, the stopping position is fixed to be the center point between pulses. Furthermore, there may be cases in which the offset characteristics vary as a result of variations in the main control circuit 10 over time; accordingly, the condition of the stopping position is monitored at fixed intervals following the offset adjustment; and when a positional deviation occurs as a result of fluctuations in the offset characteristics, then the adjustment is performed again.
Examples of DC motor position control circuits of this type are described in Japanese Examined Patent Application Publication (Kokai) Nos. S53-44777 and H6-61294 and Japanese Patent Application Examined Publication (Kokoku) No. S59-42324, etc.
In the offset adjustment performed using the conventional method above, the offset adjustment circuit 4 is adjusted while the position signal 16 is monitored by a measuring device in the stopped state in which position control is performed. As a result, skill is required in order to perform this offset adjustment, so that the adjustment cannot be easily performed. Furthermore, if the amplifier 13, driver 14, etc. are used as unit parts, an offset adjustment must be performed each time these unit parts are replaced for purposes of maintenance or repair; accordingly, the time required for repairs increases.